/**
 * 
 */
package com.nxn.core.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "t_permission")
public class Permission extends IdEntity {

	private String name;
	private String displayName;
	private Resources resource;
	private Actions action;

	@Column(name = "name", unique = true, nullable = false)
	public String getName() {
		return name;
	}
	@Column(name = "displ_Name")
	public String getDisplayName() {
		return displayName;
	}
	@ManyToOne(cascade={CascadeType.MERGE})
	public Resources getResource() {
		return resource;
	}
	@ManyToOne(cascade={CascadeType.MERGE})
	public Actions getAction() {
		return action;
	}
	public void setName(String name) {
		this.name = name;
	}
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}
	public void setResource(Resources resource) {
		this.resource = resource;
	}
	public void setAction(Actions action) {
		this.action = action;
	}
	
}